<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    /* .box {
        width: 300px;
        height: 200px;
        background: skyblue;
        display: flex;
        align-items: center;
    } */
    /* .box {
        width: 300px;
        height: 200px;
        background: skyblue;
        display: flex;
        flex-wrap: wrap;
        align-content: center;
    } */
    /* .box {
        width: 300px;
        height: 200px;
        background: skyblue;
        line-height: 200px;
    } */

    /* .box {
        width: 300px;
        height: 200px;
        background: skyblue;
        display: flex;
        align-items: center;
    } */

    /* .box {
        width: 300px;
        height: 200px;
        background: skyblue;
        display:table-cell;
        vertical-align: middle;
    } */

    /* .box {
        width: 300px;
        height: 200px;
        background: skyblue;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .box div{
        width:100px;
        height:100px;
        background:pink;
    } */

    /* .box {
        width: 300px;
        height: 200px;
        background: skyblue;
        position: relative;
    }
    .box div{
        width:200px;
        height:50px;
        background:pink;
        position: absolute;
        left:50%;
        top:50%;
        transform: translate(-50%,-50%);
    } */

    /* .box {
        width: 300px;
        height: 200px;
        background: skyblue;
        position: relative;
        display: flex;
    }
    .box div{
        width:200px;
        height:50px;
        background:pink;
        margin:auto;
    } */

    .box {
      width: 300px;
      height: 200px;
      background: skyblue;
      position: relative;
    }

    .box div{
      width:200px;
      height:50px;
      background:pink;
      position: absolute;
      left:0;
      top:0;
      right:0;
      bottom:0;
      margin:auto;
    }
  </style>
</head>

<body>
<!-- <div class="box">
    测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字测试文字
</div> -->

<div class="box">
  <div></div>
</div>
</body>

</html>
